#include <ClassFactoryObjectBullet.h>
#include <iostream>
#include <BulletClassDataSource/PhysicsWorldBullet.h>
#include <BulletClassDataSource/RigidBodyBullet.h>
ClassFactoryObjectBullet::ClassFactoryObjectBullet( ): ClassFactoryObject()
{

}

ClassFactoryObjectBullet::~ClassFactoryObjectBullet()
{

}

EObject *ClassFactoryObjectBullet::creatObject(const QString &type_name)
{
    if(type_name == "PhysicsWorldBullet" )
    {
        return new PhysicsWorldBullet();
    }
    else if(type_name == "RigidBodyBullet")
    {
        return new RigidBodyBullet();
    }


    return NULL;

}

QList<QSharedPointer<EObject> > ClassFactoryObjectBullet::generateObjectList()
{
    QList<QSharedPointer<EObject>> object_list;
    {
        EObject* objPtr = new PhysicsWorldBullet;
        object_list.push_back(objPtr->getSharedPtr());
    }
    {
        EObject* objPtr = new CollisionObjectBullet;
        object_list.push_back(objPtr->getSharedPtr());
    }
    {
        EObject* objPtr = new RigidBodyBullet;
        object_list.push_back(objPtr->getSharedPtr());
    }
    return object_list;
}
